<!--商品查询-->

<title>商品查询</title>

<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>京东联盟</cite></a>
        <a><cite>商品查询</cite></a>
    </div>
</div>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="app-forum-list">


            <!-- 第一行筛选框 -->
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">ID</label>
                    <div class="layui-input-block" style="width: 100px;">
                        <input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">品牌名称</label>
                    <div class="layui-input-block" style="width: 100px;">
                        <select name="brand"> <!-- 读库,品牌名称 -->
                            <option value="0">全部</option>
                            <option value="1">品牌1埃里克的技法卢卡斯大家来看</option>
                            <option value="2">品牌2</option>
                            <option value="2">品牌3</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">商品编码</label>
                    <div class="layui-input-block" style="width: 100px;">
                        <input type="text" name="content" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
<!--                <div class="layui-inline">-->
<!--                    <label class="layui-form-label">排序</label>-->
<!--                    <div class="layui-input-block" style="width: 100px;">-->
<!--                        <select name="brond">-->
<!--                            <option value="0">默认排序</option>-->
<!--                            <option value="1">价格升序</option>-->
<!--                            <option value="2">价格降序</option>-->
<!--                            <option value="3">佣金升序</option>-->
<!--                            <option value="4">佣金降序</option>-->
<!--                        </select>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            &lt;!&ndash; 第二行筛选框 &ndash;&gt;-->
<!--            <div class="layui-form-item">-->
                <div class="layui-inline">
                    <label class="layui-form-label">一级分类</label>
                    <div class="layui-input-block" style="width: 100px;">
                        <input type="text" name="cidname" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">二级分类</label>
                    <div class="layui-input-block" style="width: 100px;">
                        <input type="text" name="cid2name" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">三级分类</label>
                    <div class="layui-input-block" style="width: 100px;">
                        <input type="text" name="cid3name" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <!-- 搜索行 -->

                <div class="layui-inline">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <button class="layui-btn layui-btn-sm layuiadmin-btn-forum-list layui-btn-primary" lay-submit lay-filter="LAY-app-forumlist-search">
                        重置
                    </button>
                    <button class="layui-btn layui-btn-sm layuiadmin-btn-forum-list" lay-submit lay-filter="LAY-app-forumlist-search">
                        查询结果
                    </button>
                </div>

            </div>
        </div>

        <div class="layui-card-body">
            <table id="LAY-app-forum-list" lay-filter="LAY-app-forum-list"></table>
            <script type="text/html" id="imgTpl">
                <img style="display: inline-block; width: 50%; height: 100%;" src= {{ d.imgUrl }}>
            </script>
            <script type="text/html" id="table-forum-list">
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="particulars"><i class="layui-icon layui-icon-edit"></i>详情</a>
            </script>
        </div>
    </div>
</div>

<script>
layui.define(['table', 'form'], function(exports){
var $ = layui.$
,admin = layui.admin
,view = layui.view
,table = layui.table
,form = layui.form;

form.render(null, 'app-forum-list');

//商品查询
table.render({
    elem: '#LAY-app-forum-list'
    //,url: './json/Jdmedia/goodslist.js' //模拟接口
    ,url: 'http://10.2.117.119:8000/jdmedia/get/showproduct' //实际接口
    ,cols: [[
        {field: 'id', title: 'ID', width: '5%', sort: true}
        ,{field: 'imgUrl', title: '商品图片', width: '13%', templet: '#imgTpl'}
        ,{field: 'goodsName', title: '商品名称', width: '30%'}
        ,{field: 'unitPrice', title: '商品价格(￥)', sort: true}
        ,{field: 'cidName', title: '一级分类'}
        ,{field: 'cid2Name', title: '二级分类'}
        ,{field: 'cid3Name', title: '三级分类'}
        ,{field: 'isJdSale', title: '是否秒杀'}
        ,{field: 'commisionRatioWl', title: '无线佣金(%)', sort: true}
        ,{title: '更多', width: '5%', align: 'center', fixed: 'right', toolbar: '#table-forum-list'}
        ]]
    ,page: true
    ,limit: 20
    ,limits: [10, 20, 30, 50, 100]
    ,text: '对不起，加载出现异常！'
});


exports('forum', {})
});
</script>